<?php
/**
 *  Copy and include this file to get SPIP environment in your simple php script.
 * 
 */
$version_lanceur = '1.0.0';

if (!defined('_ECRIRE_INC_VERSION')) {
	// recherche du loader SPIP.
	$deep = 2;
	$lanceur ='ecrire/inc_version.php';
	$include = '../../'.$lanceur; //Configurate this according to your script (it may be '../')
	while (!defined('_ECRIRE_INC_VERSION') && $deep++ < 6) { 
		// attention a pas descendre trop loin tout de meme ! 
		// plugins/zone/stable/nom/version/tests/ maximum cherche
		$include = '../' . $include;
		if (file_exists($include)) {
			chdir(dirname(dirname($include)));
			require $lanceur;
		}
	}	
}
if (!defined('_ECRIRE_INC_VERSION')) {
	die("<strong>Failure :</strong> SPIP can not be started automatically.");
}
?>
